
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
About structures</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp83.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp85.htm" >Next</A>
<!-- End Header -->
<A NAME="BEGBBAIH"></A><h1>About structures</h1>
<A NAME="TI2299"></A><p>A structure is a collection of one or more related variables
of the same or different datatypes grouped under a single name.
In some languages, such as Pascal and COBOL, structures are called
records.</p>
<A NAME="TI2300"></A><p>Structures allow you to refer to related entities as a unit
rather than individually. For example, if you define the user's
ID, address, access level, and a picture (bitmap) of the employee
as a structure called <b>s_employee</b>,
you can then refer to this collection of variables as <b>s_employee</b>.</p>
<A NAME="TI2301"></A><h4>Two kinds</h4>
<A NAME="TI2302"></A><p>There are two kinds of structures: </p>
<A NAME="TI2303"></A><p><A NAME="TI2304"></A>
<ul>
<li class=fi>Global structures,
which are not associated with any object in your application. You
can declare an instance of the structure and reference the instance
in any script in your application.</li>
<li class=ds>Object-level structures, which are associated with
a particular type of window, menu, or user object, or with the Application
object. These structures can always be used in scripts for the object
itself. You can also choose to make the structures accessible from
other scripts.
</li>
</ul>
</p>
<A NAME="TI2305"></A><h2>Deciding which kind you want</h2>
<A NAME="TI2306"></A><p>When you design your application, think about how the structures
you are defining will be used:</p>
<A NAME="TI2307"></A><p><A NAME="TI2308"></A>
<ul>
<li class=fi>If the structure is
general-purpose and applies throughout the application, make it
a global structure.</li>
<li class=ds>If the structure applies only to a particular type
of object, make it an object-level structure.
</li>
</ul>
</p>

